
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class Test10 extends StatefulWidget {
  @override
  _Test10State createState() => _Test10State();
}

class _Test10State extends State<Test10> {
  double sliderValue = 0;

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            Text("data"),
            SliderTheme(
                data: SliderTheme.of(context).copyWith(
                    activeTrackColor:Colors.red,
                    inactiveTrackColor:Colors.yellow,
                    disabledActiveTrackColor:Colors.blue,
                    disabledInactiveTrackColor:Colors.black,
                    thumbColor:Colors.green
                ),
                child: Slider(
                  value: sliderValue,
                  onChanged: (value) {
                    setState(() {
                      sliderValue = value;
                    });
                  },
                ))
          ],
        ),
      ),
    );
  }
}
